<template>
  <div>
    <van-nav-bar title="个人信息编辑" left-arrow>
      <template #right>
        <van-icon color="#000" name="wap-home-o" size="20" />
      </template>
    </van-nav-bar>
    <div class="head_img">
      <img :src="user.head_img | joinPath" alt="" />
    </div>
    <van-cell title="昵称" is-link :value="user.username" />
    <van-cell title="密码" is-link value="***********" />
    <van-cell title="性别" is-link value="女" />
  </div>
</template>

<script>
import { userInfo } from "../api/user";
export default {
  data() {
    return {
      user: {},
    };
  },
  created() {
    let id = localStorage.getItem("ly-14-userId");
    userInfo(id).then((res) => {
      console.log(res);
      this.user = res.data.daata;
    });
  },
};
</script>

<style scoped lang="less">
/deep/ .van-nav-bar {
  border-bottom: 1px solid #ddd;
  .van-icon-arrow-left {
    color: #000;
  }
}
.head_img {
  width: 150px;
  height: 150px;
  margin: 20px auto;
  img {
    width: 100%;
  }
}
.van-cell {
  border-bottom: 1px solid #dddd;
}
</style>